package com.orders.commandFactory;

import java.util.HashMap;
import java.util.Map;

import com.orders.command.ApplyOrder;
import com.orders.command.Command;
import com.orders.console.ShutDown;
import com.orders.pojo.Customer;

public class CustomerCommandFactory extends AbstractCommandFactory {
	private static Customer customer;
	private static Map map;
	public CustomerCommandFactory(Customer customer){
		this.customer = customer;
	}
	static{
		map = new HashMap<>();
		map.put("applyorder", new ApplyOrder(customer));
		map.put("shutdown", new ShutDown());
	}
	@Override
	public Command getCommandImp(String command) {
		String cmd = command.toLowerCase();
		Command c = (Command) map.get(cmd);
		return c;
	}
	

	
	
}
